-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
REF/TST: Add more pytest idiom to mi indexing tests #24040
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #24040 +/- ##
===========================================
+ Coverage 42.46% 92.35% +49.88%
===========================================
Files 161 161
Lines 51557 51557
===========================================
+ Hits 21892 47613 +25721
+ Misses 29665 3944 -25721
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## master #24040 +/- ##
===========================================
+ Coverage 42.46% 92.35% +49.88%
===========================================
Files 161 161
Lines 51557 51557
===========================================
+ Hits 21892 47613 +25721
+ Misses 29665 3944 -25721
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome work! However, I have to ask:
Would it be possible to split this PR into multiple PR's? This would make things easier to review.
Also, if you spot opportunities to improve the tests when refactoring, those would be great as well! Improvements include:
- Breaking up big tests into smaller ones
- Checking error messages in
pytest.raises
if meaningful
@gfyoung thanks for the review. breaking down the PR is not a problem. would your preference be to split by activity, by file or perhaps limit the number of files in the PR? |
import numpy as np | ||
import pytest | ||
|
||
from pandas import DataFrame, MultiIndex, Series | ||
from pandas.util import testing as tm | ||
|
||
|
||
@pytest.mark.filterwarnings("ignore:\\n.ix:DeprecationWarning") | ||
class TestMultiIndexIloc(object): | ||
def test_iloc_getitem_multiindex2(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should fix this :>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
xref #24272
@simonjayhawkins here i think you can split by files. e.g. try to limit the amount that requires review in any 1 PR. Also if you have a PR which simply moves things, those should be independent to making actual changes. |
I second @jreback on this. |
git diff upstream/master -u -- "*.py" | flake8 --diff
for this pass:
the Test classes have been removed.
catch_warnings
used for the.ix
deprecation replaced with@pytest.mark.filterwarnings("ignore:\\n.ix:DeprecationWarning")
at test level.